//2009/08/30 01:10:26
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class ThePalindrome
{
public:
    int find(string s)
    {
		cout << s << endl;
        string s2(s);
        reverse(s2.begin(), s2.end());
		cout << s2 << endl;
        for (int i=0; i<s.size(); i++)
            if (s.substr(i, s.size()-i) == s2.substr(0, s2.size() - i))
                return s.size() + i;
    }
};
